package com.ntd.study.pro.zx.cbpp;

import java.io.IOException;
import java.util.Properties;

public class CfgLoader {

    public static Properties properties = new Properties();
    private static boolean isLoad = false;

    /**
     * 加载配置
     */
    public static void loadCfg(){
        try {
            if(isLoad){
                return;
            }
            properties.load(CfgLoader.class.getClassLoader().getResourceAsStream("cfg/config.properties"));
            isLoad = true;
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}

